package com.huangfuyi.datasource.entity;

import com.huangfuyi.datasource.enums.EDataCompare;
import com.huangfuyi.datasource.enums.EConditionCompare;

import java.util.List;

public class EDataQueryCondition {

    private String field;

    private EDataCompare dataCompare;

    private Object value;

    private EConditionCompare conditionCompare;

    private List<EDataQueryCondition> subEDataCondition;

    private final boolean emptyCondition;

    public EDataQueryCondition() {
        this.emptyCondition = true;
    }

    public EDataQueryCondition(String field, EDataCompare dataCompare, Object value) {
        this.field = field;
        this.dataCompare = dataCompare;
        this.value = value;
        this.emptyCondition = false;
    }

    public EDataQueryCondition(EConditionCompare conditionCompare, List<EDataQueryCondition> subEDataCondition) {
        this.conditionCompare = conditionCompare;
        this.subEDataCondition = subEDataCondition;
        this.emptyCondition = false;
    }

    public String getField() {
        return field;
    }

    public EDataCompare getDataCompare() {
        return dataCompare;
    }

    public Object getValue() {
        return value;
    }

    public EConditionCompare getConditionCompare() {
        return conditionCompare;
    }

    public List<EDataQueryCondition> getSubEDataCondition() {
        return subEDataCondition;
    }

    public boolean isEmptyCondition() {
        return emptyCondition;
    }
}
